#!/usr/bin/env python3

import sys
import os
import re

if __name__ == "__main__":
    _f1 = sys.argv[1];
    _f2 = sys.argv[2];

    fin = open(_f1, "rt")
    fout = open(_f2, "wt")
    for line in fin:
        # replacing the string and write to output file
        fout.write(line.replace('bb', '->'))
    #closing the input and output files
    fin.close()
    fout.close()
